package com.lanbu.system.service.impl;

import com.lanbu.system.domain.mongo.MongoApps;
import com.lanbu.system.mapper.MongoAppsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class MongoAppsService{

    @Autowired
    private MongoAppsRepository appsRepository;


    public List<MongoApps> findAll() {
        return appsRepository.findAll();
    }


    public Optional<MongoApps> findById(String id) {
        return appsRepository.findById(id);
    }


    public MongoApps save(MongoApps app) {
        return appsRepository.save(app);
    }


    public void deleteById(String id) {
        appsRepository.deleteById(id);
    }

    // 你可以根据需求添加更多的方法
}
